import { PropsWithChildren } from 'react';
import Taro, { useLaunch } from '@tarojs/taro';
import '@taroify/core/index.scss';
import '@taroify/icons/index.scss';
import './app.css';
import { Provider } from 'react-redux';
import { store } from '@/store';

function App({ children }: PropsWithChildren<any>) {
  useLaunch(() => {
    console.log('启动成功');

    Taro.redirectTo({ url: '/pages/index/index' });
  });

  // children 是将要会渲染的页面
  return <Provider store={store}>{children}</Provider>;
}

export default App;
